/* 
 * File:   NetAddress.h
 * Author: jacek
 *
 * Created on 14 kwiecień 2011, 18:46
 */

#ifndef NETADDRESS_H
#define	NETADDRESS_H
#include <netdb.h>
#include <netinet/in.h>
#include <string.h>
#include <sys/socket.h>
#include <arpa/inet.h>
namespace Net {
class NetAddress {
	sockaddr_in address;
public:
	static const socklen_t size = sizeof(sockaddr_in);
	NetAddress();
	NetAddress(const char* ip, int port);
	NetAddress(const NetAddress& orig);
	~NetAddress() {
	}
	void SetAddress(const char* hostname, int port);
	char* GetAddressIp();
	sockaddr* GetSockAddr() {
		return (sockaddr*) &address;
	}

};
}

#endif	/* NETADDRESS_H */

